\documentstyle{article}
\begin{document}

\ifx\sevenrm\undefined
  \font\sevenrm=cmr7 scaled \magstep0
\fi

\newread\MyStyle
\openin\MyStyle=src2latex.s2t
\ifeof\MyStyle
  \closein\MyStyle
\else
  \input src2latex.s2t
  \closein\MyStyle
\fi

\ifx\gtfam\undefined
  \ifx\dm\undefined
    \ifx\tendm\undefined
      \def\mc{\null}
    \else
      \def\mc{\tendm}
    \fi
  \else
    \def\mc{\dm}
  \fi
  \ifx\dg\undefined
    \ifx\tendg\undefined
      \def\gt{\null}
    \else
      \def\gt{\tendg}
    \fi
  \else
    \def\gt{\dg}
  \fi
\fi
\ifx\sc\undefined
  \def\sc{\null}
\fi

\tt\mc 

\noindent
class{\tt\mc \kern0.500em}AlgorithmPath:{\tt\mc \kern0.500em}public{\tt\mc \kern0.500em}Algorithm{\tt\char'173}

\noindent
{}public:

\noindent
{}AlgorithmPath({\tt\mc \kern0.500em}Graph{\tt\mc \kern0.500em}{\tt *}g{\tt\mc \kern0.500em}):{\tt\mc \kern0.500em}Algorithm({\tt\mc \kern0.500em}g{\tt\mc \kern0.500em}){\tt\char'173}

\noindent
{}{\tt\mc \kern4.000em}containerAdd();

\noindent
{}{\tt\mc \kern4.000em}m{\tt\_\kern.141em}container{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}{\tt\&}container(0);

\noindent
{}{\tt\mc \kern4.000em}m{\tt\_\kern.141em}container{\tt -}{\tt >}push{\tt\_\kern.141em}back({\tt\mc \kern0.500em}(new{\tt\mc \kern0.500em}ContainerElement()){\tt -}{\tt >}setNode(graph(){\tt -}{\tt >}node(0)){\tt\mc \kern0.500em});

\noindent
{}{\tt\char'175}

\noindent
{}\hfill

\noindent
{}void{\tt\mc \kern0.500em}run(){\tt\char'173}

\noindent
{}{\tt\mc \kern0.500em}\tt\mc {\tt /}{\tt /}For\kern0.500em each\kern0.500em node\kern0.500em in\kern0.500em our\kern0.500em container\kern0.500em that\kern0.500em we\kern0.500em considered\kern0.500em reachable

\noindent
\tt\mc {\tt\mc \kern0.500em}for({\tt\mc \kern0.500em}int{\tt\mc \kern0.500em}i{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}0;{\tt\mc \kern0.500em}i{\tt\mc \kern0.500em}{\tt <}{\tt\mc \kern0.500em}m{\tt\_\kern.141em}container{\tt -}{\tt >}size();{\tt\mc \kern0.500em}i++{\tt\mc \kern0.500em}){\tt\char'173}

\noindent
{}{\tt\mc \kern1.000em}\tt\mc {\tt /}{\tt /}Store\kern0.500em this\kern0.500em node\kern0.500em temporarily

\noindent
\tt\mc {\tt\mc \kern1.000em}const{\tt\mc \kern0.500em}Node{\tt\mc \kern0.500em}currentNode{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}{\tt *}({\tt *}m{\tt\_\kern.141em}container)[i]{\tt -}{\tt >}node();

\noindent
{}{\tt\mc \kern1.000em}\tt\mc {\tt /}{\tt /}For\kern0.500em each\kern0.500em edge\kern0.500em in\kern0.500em the\kern0.500em graph

\noindent
\tt\mc {\tt\mc \kern1.000em}for({\tt\mc \kern0.500em}int{\tt\mc \kern0.500em}j{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}0;{\tt\mc \kern0.500em}j{\tt\mc \kern0.500em}{\tt <}{\tt\mc \kern0.500em}graph(){\tt -}{\tt >}numEdges();{\tt\mc \kern0.500em}j++{\tt\mc \kern0.500em}){\tt\char'173}

\noindent
{}{\tt\mc \kern1.500em}\tt\mc {\tt /}{\tt /}Store\kern0.500em this\kern0.500em edge\kern0.500em temporarily

\noindent
\tt\mc {\tt\mc \kern1.500em}const{\tt\mc \kern0.500em}Edge{\tt\mc \kern0.500em}currentEdge{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}graph(){\tt -}{\tt >}edge(j);

\noindent
{}{\tt\mc \kern1.500em}

\noindent
{}{\tt\mc \kern1.500em}\tt\mc {\tt /}{\tt /}If\kern0.500em this\kern0.500em edge\kern0.500em starts\kern0.500em from\kern0.500em this\kern0.500em node

\noindent
\tt\mc {\tt\mc \kern1.500em}if({\tt\mc \kern0.500em}currentEdge.from(){\tt\mc \kern0.500em}!={\tt\mc \kern0.500em}currentNode{\tt\mc \kern0.500em})

\noindent
{}{\tt\mc \kern2.000em}continue;

\noindent
{}{\tt\mc \kern1.500em}

\noindent
{}{\tt\mc \kern1.500em}highlight(currentEdge);

\noindent
{}{\tt\mc \kern1.500em}bool{\tt\mc \kern0.500em}alreadyContained{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}false;

\noindent
{}{\tt\mc \kern1.500em}for({\tt\mc \kern0.500em}int{\tt\mc \kern0.500em}k{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}0;{\tt\mc \kern0.500em}k{\tt\mc \kern0.500em}{\tt <}{\tt\mc \kern0.500em}m{\tt\_\kern.141em}container{\tt -}{\tt >}size(){\tt\mc \kern0.500em}{\tt\&}{\tt\&}{\tt\mc \kern0.500em}!alreadyContained;{\tt\mc \kern0.500em}k++{\tt\mc \kern0.500em})

\noindent
{}{\tt\mc \kern2.000em}alreadyContained{\tt\mc \kern0.500em}={\tt\mc \kern0.500em}currentEdge.to(){\tt\mc \kern0.500em}=={\tt\mc \kern0.500em}{\tt *}({\tt *}m{\tt\_\kern.141em}container)[k]{\tt -}{\tt >}node();

\noindent
{}{\tt\mc \kern1.500em}if(!alreadyContained)

\noindent
{}{\tt\mc \kern2.000em}m{\tt\_\kern.141em}container{\tt -}{\tt >}push{\tt\_\kern.141em}back({\tt\mc \kern0.500em}(new{\tt\mc \kern0.500em}ContainerElement){\tt -}{\tt >}setNode(currentEdge.to()){\tt\mc \kern0.500em});

\noindent
{}{\tt\mc \kern1.000em}

\noindent
{}{\tt\mc \kern1.000em}{\tt\char'175}

\noindent
{}{\tt\mc \kern0.500em}{\tt\char'175}

\noindent
{}{\tt\char'175}

\noindent
{}private:

\noindent
{}Container{\tt\mc \kern0.500em}{\tt *}m{\tt\_\kern.141em}container;

\noindent
{}{\tt\char'175};{\tt\mc \kern0.500em}

\noindent
{}

\rm\mc

\end{document}
